var t = function(t) {
    return (t = t.toString())[1] ? t : "0" + t;
};

module.exports = {
    formatTime: function(e) {
        var o = e.getFullYear(), n = e.getMonth() + 1, r = e.getDate(), i = e.getHours(), u = e.getMinutes(), s = e.getSeconds();
        return [ o, n, r ].map(t).join("/") + " " + [ i, u, s ].map(t).join(":");
    },
    resolutionAddress: function(t, e) {
        wx.request({
            url: "https://apis.map.qq.com/ws/geocoder/v1/?l&get_poi=1",
            data: {
                key: wx.getStorageSync("MAP_KEY") || "PNIBZ-QF5R2-XSGUL-CGVXI-5J4GZ-VNFNX",
                location: t
            },
            method: "GET",
            success: function(t) {
                e(t);
                console.log(t);
            },
            fail: function() {},
            complete: function() {}
        });
    }
};